
#include <stdlib.h>
#include <stdio.h>

#include "ORT_misc.h"

void main() {
	//printf("hello world!\n");

	//test();

	const char *error = NULL;
	int errflag = 0;
	error = InitNNFilter1(&errflag, "NNFilter1.onnx", 256, 256, 1);
	if (errflag) {
		printf(error);
		printf("\n");
	}
	else {
		unsigned short *data = malloc(512 * 512 * sizeof(unsigned short));
		float *outdata = malloc(512 * 512 * sizeof(float));
		for (size_t i = 0; i < 512 * 512; i++)
		{
			data[i] = i & 0x0FFFF;
			outdata[i] = 0;
		}

		error = NNFilter1Infer(&errflag, 512, 512, 256, 256, data, outdata, 0);
		error = NNFilter1Infer(&errflag, 512, 512, 256, 256, data, outdata, 1);

		free(data);
		free(outdata);
	}

	ReleaseNNFilter1();
	system("pause");
}
